/************************************************
Equivalent depth conversion factor
EDCFactor (Equivalent Depth Conversion Factor)
This object is used to calculate the factor to transform the equivalent depth
to actual runoff.
The unit of the rainfall depth is millimeter.
The unit of the output hydrograph is cubic meters per second.
Author: Chun-Ming Wang
Date of Modification: 12/06/2006 (dd/mm/yyyy)
*************************************************/
#pragma once
#include "stdafx.h"
#ifndef _EDCFactor
#define _EDCFactor
#include "Misc.h"
using namespace std;
class EDCFactor:
	public
	std::unary_function<double, double>
{
public:
	EDCFactor();
	EDCFactor(const double& area, const unsigned int interval);
	const double operator()(const double& rhs);
	double area() const { return m_area;}
	bool area(const double& input);
	unsigned int interval() const { return m_interval;}
	bool interval(const unsigned int& input);
	bool factor(); // calculate the factor
private:
	double m_factor;
	double m_area; // the area of the watershed (in square km)
	unsigned int m_interval; // time interval of simulation (in minute)
};
#endif